package com.ungao.tools.generator.builder;


import com.ungao.tools.generator.connection.IConnection;
import com.ungao.tools.generator.converter.IConverter;
import com.ungao.tools.generator.rules.IColumnType;

public interface IBuilder<R, B> {

    /**
     * 创建
     *
     * @param connection
     * @return
     * @throws Exception
     */
    B create(IConnection connection) throws Exception;

    /**
     * 处理
     *
     * @param columnType
     * @return
     * @throws Exception
     */
    B handle(IColumnType columnType) throws Exception;

    /**
     * 转换
     *
     * @param converter
     * @return
     * @throws Exception
     */
    B converter(IConverter converter) throws Exception;

    /**
     * 构建
     *
     * @return
     */
    R build();
}
